<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Kahnsept Command Line Demo</title>
<link rel="stylesheet" type="text/css" href="styles/main.css" />
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="/lib/0.6/js/json2.min.js"></script>
<script type="text/javascript" src="/lib/beta/js/utils.js"></script>
<script type="text/javascript" src="command.js"></script>
<script type="text/javascript" src="kahnsept.js"></script>
<script>
var command = namespace.com.pageforest.kahnsept.command;
$(document).ready(command.onReady);
</script>
</head>
<body>
<div class="page">
<h1><script>document.write(document.title);</script></h1>
<div style="text-align:right">
  <input type="button" id="signin" onclick="command.signInOut()" value="Sign in" />
  <p style="font-style:italic;font-size:20px;">Current username: <span id="username"></span></p>
</div>
<fieldset>
  <legend>Data Fields</legend>
  <ol>
    <li>
      <label for="command">Cmd:</label>
      <input type="text" id="command" name="command" value="world.createSchema('Test')" />
    </li>
    <li>
      <label for="json">Value:</label>
      <div id="value"></div>
    </li>
    <li>
      <label for="json">JSON:</label>
      <div id="json"></div>
    </li>
  </ol>
  <div style="float:right;">
    <input type="button" onclick="command.client.detach();" value="Make a Copy" />
    <input id="save" type="button" onclick="command.client.save();" value="Save" />
  </div>
  <p><i>Document is <span id="doc-state">clean</span>.</i></p>
</fieldset>

<fieldset>
  <legend>API Status</legend>
  <div id="error"></div>
</fieldset>

<fieldset>
  <legend>Explore</legend>
  <p>
    This sample is allows you to explore a Kahnsept document/database via JavaScript commands.
  </p>
  <ol>
    <li><a id="document" target="_blank">JSON data for this document</a> - Examine the (JSON) data format for documents saved using Kahnsept.</li>
  </ol>
</fieldset>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-2072869-7']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

</div> <!-- page -->
</body>
</html>
